package robocup.component.infotypes;

/**
 * A visual info for the ball. Depending on the distance, a different precision
 * of the seen values are given.
 */
public class BallInfo
    extends DynamicObjectInfo {

  /**
   * Constructs an info of a seen ball
   * 
   * @param cycle -
   *          when was it seen
   * @param iDistance -
   *          the distance to the seen ball
   * @param iDirection -
   *          the direction to the seen ball
   * @param iDistchange -
   *          the distance change (used for speed) of the seen ball
   * @param iDirchange -
   *          the direction change (used for speed) of the seen ball
   */
  public BallInfo(
      final int cycle,
      final double iDistance,
      final double iDirection,
      final double iDistchange,
      final double iDirchange) {

    // der Ball hat keine Id, deshalb -1
    super(cycle, -1, iDistance, iDirection, iDistchange, iDirchange);
  }

  /**
   * @return String - a debug-string for the seen ball.
   */
  @Override
  public String toString() {

    return ("BallInfo: Dist:" + this.distance + " Dir: " + this.direction + " dDist: " + this
        .getDistChange() + " dDir: " + this.getDirChange());
  }
}
